<template>
  <div class="riskManagement-root runningAnalysis-root">
    <div class="box">
      <taskTrend :riskTypeOptions="riskTypeOptions" :dateValueMap="dateYearValueMap" :dataSelectOptions="dataYearSelectOptions" />
    </div>
    <div class="box">
      <taskProgress :riskTypeOptions="riskTypeOptions" :dateValueMap="dateValueMap" :dataSelectOptions="dataSelectOptions"/>
    </div>
    <div class="box">
      <taskStatistics :riskTypeOptions="riskTypeOptions" :dateValueMap="dateValueMap" :dataSelectOptions="dataSelectOptions" />
    </div>
    <div class="box">
      <hazardType :riskTypeOptions="riskTypeOptions" :dateValueMap="dateValueMap" :dataSelectOptions="dataSelectOptions" />
    </div>
  </div>
</template>

<script>
  import hazardType from './components/hazardType.vue';
  import taskStatistics from './components/taskStatistics.vue';
  import taskTrend from './components/taskTrend.vue';
  import taskProgress from './components/taskProgress.vue';
  import { dateValueMap,dataSelectOptions,dateYearValueMap,dataYearSelectOptions } from '@/utils/global.js';
  export default {
    name: "index",
    components: {
      hazardType,taskStatistics,taskTrend,taskProgress
    },
    data() {
      return {
        riskTypeOptions:[],
        dateValueMap:dateValueMap,
        dateYearValueMap:dateYearValueMap,
        dataSelectOptions:dataSelectOptions,
        dataYearSelectOptions:dataYearSelectOptions
      };
    },
    methods: {},
    created(){
      this.riskTypeOptions = []
      this.$commonJs.filterDataDict("hazardSClassify",this.riskTypeOptions)
      this.riskTypeOptions.splice(0,0,{label:"全部类型",value:"",name:""})
      this.riskTypeOptions.forEach(t=>{
        t.value = t.name
      })
    }
  }
</script>

<style lang="scss" scoped>
  /*注意引入路径*/
  @import "../../../../runningAnalysis/runningAnalysis";
  .riskManagement-root {
    display: flex;
    flex-wrap: wrap;
    background-color: white;
    .box-100{
      width: 100%;
      padding: 8px 12px;
    }
    .box{
      width: 50%;
      padding: 8px 12px;
      margin-bottom: 20px;
    }
  }
</style>
